﻿export class AppConsts {

    static readonly tenancyNamePlaceHolderInUrl = '{TENANCY_NAME}';

    static serverBaseUrl: string;
    static serverBaseUrlFormat: string;
    static clientBaseUrl: string;
    static clientBaseUrlFormat: string;
    static appBaseHref: string; // returns angular's base-href parameter value if used during the publish
    static arcgisMapUrl: string;
    static arcgisStyleUrl: string;
    static arcgisMapServerUrl: string;
    static wsHost: string;
    // static recaptchaSiteKey: string;
    // static subscriptionExpireNootifyDayCount: number;

    // static localeMappings: any = [];

    static readonly userManagement = {
        defaultAdminUserName: 'admin'
    };

    static readonly localization = {
        defaultLocalizationSourceName: 'Siiat'
    };

    static readonly authorization = {
        encrptedAuthTokenName: 'enc_auth_token'
    };




    static readonly staticJson = {
        'multiTenancy': {
            'isEnabled': false,
            'sides': {
                'host': 2,
                'tenant': 1
            }
        },
        'session': {
            'tenantId': 1,
            'impersonatorUserId': null,
            'impersonatorTenantId': 1,
            'multiTenancySide': 1
        },
        'localization': {
            'currentCulture': {
                'name': 'zh-CN',
                'displayName': '中文(简体，中国)'
            },
            'languages': [
                {
                    'name': 'en',
                    'displayName': 'English',
                    'icon': 'famfamfam-flags gb',
                    'isDefault': false,
                    'isDisabled': false,
                    'isRightToLeft': false
                },
                {
                    'name': 'zh-CN',
                    'displayName': '简体中文',
                    'icon': 'famfamfam-flags cn',
                    'isDefault': true,
                    'isDisabled': false,
                    'isRightToLeft': false
                }
            ],
            'currentLanguage': {
                'name': 'zh-CN',
                'displayName': '简体中文',
                'icon': 'famfamfam-flags cn',
                'isDefault': true,
                'isDisabled': false,
                'isRightToLeft': false
            },
            'sources': [
                {
                    'name': 'Abp',
                    'type': 'MultiTenantLocalizationSource'
                },
                {
                    'name': 'AbpWeb',
                    'type': 'MultiTenantLocalizationSource'
                }
            ],
            'values': {
                'Abp': {
                    'AllOfThesePermissionsMustBeGranted': '您没有权限进行此操作,您需要以下权限: {0}',
                    'AtLeastOneOfThesePermissionsMustBeGranted': '您没有权限进行此操作,您至少需要下列权限的其中一项: {0}',
                    'CurrentUserDidNotLoginToTheApplication': '当前用户没有登录到系统！',
                    'DefaultFromSenderDisplayName': '默认发件人名字',
                    'DefaultFromSenderEmailAddress': '默认发件人邮箱地址',
                    'DefaultLanguage': '预设语言',
                    'DomainName': '域名',
                    'MainMenu': '主菜单',
                    'Password': '密码',
                    'ReceiveNotifications': '接收通知',
                    'SmtpHost': 'SMTP主机',
                    'SmtpPort': 'SMTP端口',
                    'TimeZone': '时区',
                    'UseDefaultCredentials': '使用默认验证',
                    'Username': '用户名',
                    'UseSSL': '使用SSL'
                },
                'AbpWeb': {
                    'AreYouSure': '你确定吗?',
                    'Cancel': '取消',
                    'InternalServerError': '对不起,在处理您的请求期间,产生了一个服务器内部错误!',
                    'ValidationError': '您的请求无效!',
                    'Yes': '确定'
                }
            }
        },
        'features': {
            'allFeatures': {}
        },
        'clock': {
            'provider': 'localClockProvider'
        },
        'timing': {
            'timeZoneInfo': {
                'windows': {
                    'timeZoneId': 'UTC',
                    'baseUtcOffsetInMilliseconds': 0.0,
                    'currentUtcOffsetInMilliseconds': 0.0,
                    'isDaylightSavingTimeNow': false
                },
                'iana': {
                    'timeZoneId': 'Etc/UTC'
                }
            }
        },
        'security': {
            'antiForgery': {
                'tokenCookieName': 'XSRF-TOKEN',
                'tokenHeaderName': 'X-XSRF-TOKEN'
            }
        }
    };
}
